/**Name : main
 * Effect : 地图按需加载各模块
 */
requirejs.config({
    map:{'*': {css: 'lib/css.min'}},
    paths:{
        jquery:['/js/lib/jquery.min'],
        template:['/js/lib/template.min'],
        md5:['/js/lib/md5'],
        echarts:['/js/lib/echarts.min'],
        page:['/js/lib/initPage'],
        layer:['/js/lib/layer/layer'],
        countUp:['/js/lib/countUp'],
        slimscroll:['/js/lib/perfect-scrollbar.min'],
        iCheck:['/js/lib/iCheck/iCheck.min'],
        datepicker: ['/js/lib/datepicker/datepicker.min'],
        validate:['/js/lib/jquery.validate.min'],
        drawingManager: ['/js/lib/map/DrawingManager.min'],
        lushu: ['/js/lib/map/LuShu.min'],
        BMapLib: ['/js/lib/map/GeoUtils.min'],
        liMarquee: ['/js/lib/jquery.liMarquee'],
        select2:['/js/lib/select/select2.min']
    },
    shim: {
        'slimscroll':['css!/js/lib/map/perfect-scrollbar.css'],
        'layer':['css!/js/lib/layer/layer.css'],
        'iCheck': ['css!/js/lib/iCheck/square/blue.css'],
        'datepicker': ['css!/js/lib/datepicker/datepicker.min.css'],
        'select2':['css!/js/lib/select/select2.min.css']
    },
    waitSeconds: 0,
    urlArgs: "version=v1.0"
});
require(['jquery'],function (){
    init();
    function init(){
        var routeId=$('.js-route-flag');
        //地图主页
        if(routeId.hasClass('js-map')){
            require(['map'],function (map){
                map.init();
            });
        };
        if(routeId.hasClass('js-relation')){
            require(['views/mapApplication/relation'],function (relation){
                relation.init();
            });
        };
    }
});